package com.syp.jrx.service;

import com.syp.jrx.mapper.TransactionMapper;
import com.syp.jrx.model.Transaction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class TransactionService {
    @Autowired
    private TransactionMapper transactionMapper;

    public Transaction selectById(int cust_id){
        return transactionMapper.selectById(cust_id);
    }

    public Transaction selectByDate(Date txn_datetime){
        return transactionMapper.selectByDate(txn_datetime);
    }

    public Transaction selectByIdAndDate(int cust_id,Date txn_datetime){
        return transactionMapper.selectByIdAndDate(cust_id,txn_datetime);
    }

    public int insertTransaction(Transaction transaction){
        return transactionMapper.insertTransaction(transaction);
    }
}
